import request from '@/utils/request'

export function getList(data) {
  return request({
    url: '/user/query',
    method: 'post',
    data
  })
}
export function getListByName(data,userName) {
  return request({
    url: '/user/queryName/'+userName,
    method: 'post',
    data
  })
}
export function addUser(data) {
  return request({
    url: '/user/add',
    method: 'post',
    data
  })
}
export function updateUser(data) {
  return request({
    url: '/user/update',
    method: 'post',
    data
  })
}
export function deleteUser(userId) {
  return request({
    url: '/user/delete/'+ userId,
    method: 'post',
  })
}
export function getStudentList(data) {
  return request({
    url: '/user/queryStudent',
    method: 'post',
    data
  })
}
export function getTeacherList(data) {
  return request({
    url: '/user/queryTeacher',
    method: 'post',
    data
  })
}